package com.hzsk.lisence.util;

import org.springframework.stereotype.Component;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@Component
public class LocalCacheUtils {

    private static final Map<String, Map<String,Object>> local_map = new ConcurrentHashMap<>();



    public static void setData(String key,Map<String,Object> data){
        local_map.put(key,data);
    }

    public static Map<String, Map<String,Object>> getAll(){
        return local_map;
    }

    public static Map<String,Object> get(String key){
        return local_map.get(key);
    }

    public static void del(String key){
         local_map.remove(key);
    }

    public static boolean isExist(String key){
        return local_map.containsKey(key);
    }


}
